package org.study.springboot.learning.design.strategy;

/**
 * <p>Title: Context <p>
 * <p>Description: 某个类持有策略的引用<p>
 *
 * @Author ZhangSY
 * @Date 2021/7/5 23:20
 * @Version v1.0
 **/
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }
    public  void setStrategyMethod() {
        strategy.useStrategy();
    }
}
